//
//  ShareDetailsHeaderView.swift
//  TianTianBiTing
//
//  Created by Gox mac 2 on 2019/3/6.
//  Copyright © 2019 Gox_WallyDiao. All rights reserved.
//

import UIKit

class ShareDetailsHeaderView: UIView {
    var moreBlock:(() -> Void)?

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.backgroundColor = UIColor.clear
        setUI()
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUI() {
        let label = UILabel.init(frame: FRAME_CGFloat(16, 5, 130, 20))
        label.font = Font_Medium(14)
        label.textColor = RGB_Same(0)
        label.backgroundColor = WhiteBackColor
        label.text = "更多分享免费领课程"
        self.addSubview(label)
        
        let button = UIButton(type: UIButton.ButtonType.custom)
        button.frame = FRAME_CGFloat(SCREEN_WIDTH - 65, 6, 55, 18.5)
        button.setTitle("查看更多", for: .normal)
        button.setTitleColor(RGB_Same(53), for: .normal)
        button.titleLabel?.font = FONT(13)
        button.addTarget(self, action: #selector(moreBtnAction), for: .touchUpInside)
        self.addSubview(button)
    }
    
    @objc func moreBtnAction() {
        moreBlock?()
    }

}
